import initPageFormItem from './init-page-form-item';

let config = {
    component: 'jzlTextNav',
    icon: 'fa fa-list-ul',
    name: '文本列表',

    ele_style: {
      _code: 'ThisIsCode',
        _name: '文本列表',
        _render: '_ele',
        _node: 'div',
        _ss: {
            theme: "txt-nav-list"
        },
        _sh: {},
        _rh: false,
        _sort: [ 'artFont', 'container', 'apps' ],

        apps: {
            "_sh": {
                "_mix": true,
                "loop": false,
                "muted": false,
                "colors": [],
                "autoplay": false,
                "bgColors": [],
                "controls": true,
                "bgSvgColors": [],
                "shadowInset": false
            },
            "_ss": {
                "_mix": true,
                "loop": false,
                "muted": false,
                "colors": [],
                "autoplay": false,
                "bgColors": [],
                "controls": true,
                "bgSvgColors": [],
                "shadowInset": false
            },
            "_ext": {},
            "_lib": "jdc",
            "_low": {
                "show": null,
                "active": null
            },
            "_code": "UyHTtFEWLA",
            "_evts": [],
            "_name": "Comp-Apps",

            "_resp": {
                "lgs": null,
                "mds": null,
                "sms": null,
                "xls": null,
                "xss": null,
                "xxls": null
            },
            "_anime": {},
            "_sticky": {
                "side": "top",
                "enable": false,
                "offset": 0,
                "container": ""
            }
        },

        artFont: {
            _node: 'text',
          _code: 'ArtFont',
            _ss: {
                text: "我是一个艺术字体",
                fontType: "art",
                fontWeight: 'bold',
                // colors: [ '#99A9BF', '#F7BA2A', '#FF9900' ],
                hlType: 'svg',
                hlHeight: '10'
            },
        },
        abc: {
            _name: "Dync Comp",
            _node: "JdcCraTest01",
            _lib: "jdccrafto",
            _ss: {
                borderType: "custom",
                borderWidth: 2,
                borderStyle: "dotted",
                borderColor: "#00F"
            },
            _ext: {
                tip: "LCY"
            }
        },
        c$treeNavComp: {
            _name: "Comp-导航菜单",
            _node: "c$treeNavComp",
            _ss: { theme: 'nav-comp--test' },
            _ext: {
                optionsDef: "treeData",
                mode: "horizontal"
            },
            _sticky: { enable: true },

            c$treeNavItem: {
                _name: "Comp-导航项",
                _node: "c$treeNavItem",

                c$treeNavTitle: {
                    _name: "Comp-导航标题",
                    _node: "c$treeNavTitle",

                    c$treeNavIcon: {
                        _name: "Comp-图标",
                        _node: "c$treeNavIcon",
                    },
                    c$treeNavText: {
                        _name: "Comp-文字",
                        _node: "c$treeNavText",

                        _ss: { color: "red" },
                        _sh: { color: "blue" },
                    },
                    c$treeNavMore: {
                        _name: "Comp-更多",
                        _node: "c$treeNavMore",
                    }
                },
                c$treeNavChildren: {
                    _name: "Comp-子菜单",
                    _node: "c$treeNavChildren",
                }
            },
            c$treeNavItemFirst: {
                _name: "Comp-导航项根一级",
                _node: "c$treeNavItemFirst",

                c$treeNavTitle: {
                    _name: "Comp-导航标题",
                    _node: "c$treeNavTitle",

                    c$treeNavIcon: {
                        _name: "Comp-图标",
                        _node: "c$treeNavIcon",
                    },
                    c$treeNavText: {
                        _name: "Comp-文字",
                        _node: "c$treeNavText",
                        _ss: { color: "#0F0" },
                        _sh: { color: "blue" },
                    },
                    c$treeNavMore: {
                        _name: "Comp-更多",
                        _node: "c$treeNavMore",
                    }
                }
            },
        },
        sliderComp: {
            _name: 'Comp-轮播',
            _node: "sliderComp",
            _ss: {
                theme: "jzl-page-node-slider",
                width: "300px"
            },
            _sh: {},
            _ext: { autoplay: true, vertical: false, multiple: 1, interval: 3000, duration: 500, effect: 'flip' },
            _rh: false,

            slider: {
                _name: '轮播项',
                _node: "slider",
                _ss: {},
                _sh: {},
                _rh: false,
                _value: "sliders",

                sliderPanel: {
                    _node: 'sliderPanel',
                    _ss: { width: '100%', image: "/assets/images/noimage.png" },
                    _sh: {},
                    _rh: false,

                    img: {
                        _name: '图片',
                        _node: 'img',
                        _ss: { width: '100%', image: "/assets/images/noimage.png" },
                        _sh: {},
                        _rh: false,
                        _value: "image"
                    },
                    title: {
                        _name: "",
                        _node: "text",
                        _value: "title"
                    }
                },
                sliderPage: {
                    _node: 'sliderPage',
                    _sh: {},
                    _rh: false,

                    bullet: {
                        _node: 'bullet',
                        _sh: {},
                        _rh: false,
                    }
                },
                sliderPrevBtn: {
                    _node: 'sliderPrevBtn',
                    _sh: {},
                    _rh: false,
                },
                sliderNextBtn: {
                    _node: 'sliderNextBtn',
                    _sh: {},
                    _rh: false,
                }
            }
        },

        tabIndexDiv: {
            _name: "tabIndexDiv",
            _node: "text",
            _value: "tabIndex",
            _ss: {
                "padding": "10px",
                "fontSize": "20px"
            }
        },
        inputValueDiv: {
            _name: "tabIndexDiv",
            _node: "text",
            _value: "inputValue",
            _ss: {
                "padding": "10px",
                "fontSize": "20px"
            }
        },
        numberValueDiv: {
            _name: "numberValueDiv",
            _node: "text",
            _value: "numberValue",
            _ss: {
                "padding": "10px",
                "fontSize": "20px"
            }
        },
        /*tabsComp: {
            _name: '标签页组件',
            _node: 'tabsComp',
            _ss: {

            },
            _sh: {},
            _rh: false,
            _sort: [ 'tabs' ],
            _ext: { theme: 'jzl-tabs-theme1' },
            _value: "tabIndex",

            tabs: {
                _name: '标签页',
                _node: 'tabs',
                _value: 'model',
                _ss: {

                },
                _sh: {},
                _rh: false,
                _sort: [ 'tabsHeader', 'tabsBody' ],

                tabsHeader: {
                    _name: '标签页Header',
                    _node: 'tabsHeader',
                    _ss: {

                    },
                    _sh: {},
                    _rh: false,

                    tabsTab: {
                        _name: '标签页标题',
                        _node: 'tabsTab',
                        _ss: {

                        },

                        text: {
                            _name: '标签页标题文字',
                            _node: 'text',
                            _value: 'title',
                            _sh: {},
                            _rh: false
                        }
                    },
                },
                tabsBody: {
                    _name: '标签页Body',
                    _node: 'tabsBody',
                    _ss: {

                    },
                    _sh: {},
                    _rh: false,

                    tabsPane: {
                        _name: '标签内容',
                        _node: 'tabsPane',
                        _sh: {},
                        _rh: false,
                        _anime: {
                            enable: true,
                            opacity: [0, 1], // 从透明到不透明
                            duration: 500, // 动画持续时间
                            easing: 'easeInOutQuad', // 缓动函数
                            // direction: 'alternate', // 循环播放，来回切换
                            // loop: true // 循环播放动画
                        },

                        text: {
                            _name: '文字',
                            _node: 'text',
                            _value: 'remark',
                            _sh: {},
                            _rh: false
                        }
                    }
                }
            }
        },*/
        /*collapseComp: {
            _name: '折叠组件',
            _node: 'collapseComp',
            _ss: {
                theme: "jzl-collapse-theme2",
                margin: "10px"
            },
            _sh: {},
            _rh: false,

            collapse: {
                _name: '折叠项',
                _node: 'collapse',
                _value: 'model',
                _ss: {

                },
                _sh: {},
                _rh: false,
                _sort: [ 'collapseHeader', 'collapseBody' ],

                collapseHeader: {
                    _name: '折叠头部',
                    _node: 'collapseHeader',
                    _ss: {

                    },
                    _sort: [ 'collapseTitle', 'collapseIcon' ],

                    collapseTitle: {
                        _name: '折叠标题',
                        _node: 'collapseTitle',
                        _ss: {

                        },

                        text: {
                            _name: '折叠标题文字',
                            _node: 'text',
                            _value: 'title',
                            _sh: {},
                            _rh: false
                        }
                    },
                    collapseIcon: {
                        _name: '折叠图标',
                        _node: 'collapseIcon',
                        _tag: 'i',
                        _ss: {}
                    }
                },
                collapseBody: {
                    _name: '折叠内容',
                    _node: 'collapseBody',
                    _ss: {

                    },
                    _sh: {},
                    _rh: false,
                    _anime: {
                        enable: true,
                        height: "auto", // 从透明到不透明
                        duration: 500, // 动画持续时间
                        easing: 'easeInOutQuad', // 缓动函数
                        // direction: 'alternate', // 循环播放，来回切换
                        // loop: true // 循环播放动画
                    },

                    text: {
                        _name: '标签内容文字',
                        _node: 'text',
                        _value: 'remark',
                        _sh: {},
                        _rh: false
                    }
                }
            }
        },*/
        /*checkboxComp: {
            _name: '',
            _node: 'c$checkboxComp',
            _ss: {},
            _sh: {},
            _rh: false,
            _sort: [ 'icon', 'label', 'body', 'rightIcon' ],
            _value: "checkboxValue",
            _ext: {
                tip: "提示",
                optionsDef: "checkboxList"
            },
            icon: {
                _name: '图标',
                _type: 'icon',
                _node: 'c$ffIcon',
                _ss: { },
                _sh: {},
                _rh: false
            },
            label: {
                _name: '标签',
                _type: 'text',
                _node: 'c$ffLabel',
                _ss: {
                    "text": "多选"
                },
                _sh: {},
                _rh: false
            },
            body: {
                _name: '内容体',
                _node: 'c$ffBody',
                _ss: {},
                _sh: {},
                _rh: false,

                input: {
                    _name: '多选',
                    _node: 'c$checkbox',
                    _tag: 'JzlFormCheckbox',
                    _ss: {},
                    _sh: {},
                    _se: ["input", "change", "focus", "blur"]
                }
            },
            rightIcon: {
                _name: '右图标',
                _type: 'icon',
                _node: 'c$ffRightIcon',
                _ss: {},
                _sh: {},
                _rh: false
            }
        },
        paginationComp: {
            _name: '分页',
            _node: "paginationComp",
            _tag: "JzlPagePagination",
            _value: "pageValue",
            _ss: {
                theme: "" // jzl-button--primary jzl-button--mini
            },
            _sh: {},
            _ext: {
                pageSizeDef: "pageSizeValue", totalDef: "totalValue",
                layout: "prev, pager, next", small: false, background: false, pageSizes: "10, 20, 30", hideOnSinglePage: false
            },
            _rh: false
        },*/
        /*item1: {
            _name: '列表项',
            _render: '_item',
            _node: 'list',
            _value: 'model',
            _common_style: {
                theme: "txt-nav-item"
            },
            _sh: {},
            _rh: false,
            _sort: [ 'image', 'text', 'moreIcon' ],
            _low: {
                sType: 'formula',
                sFormula: '${IF($isFirst, false, true)}'
            },
            _anime: {
                enable: true,
                play: 'view',
                delay: 500,
                // easing: "easeInOutQuad",
                // translateX: 100,
                // duration: 1000,
                // direction: "reverse", // 'normal'-正方向动画, 'reverse'-反方向动画, 'alternate'-往返

                translateX: 130, direction: 'reverse', easing: 'easeOutQuad'
            },

            image: {
                _name: '图片',
                _render: '_image',
                _node: 'img',
                _value: 'image',
                _common_style: {
                    theme: "txt-nav-img"
                },
                _sh: {},
                _rh: false,
                _anime: {
                    enable: true,
                    easing: "easeInOutQuad",
                    scale: 1.2,
                    duration: 1000,
                    direction: "alternate"
                },
            },
            text: {
                _name: '文字',
                _render: '_text',
                _common_style: {
                    theme: "txt-nav-text"
                },
                _sh: {},
                _rh: false,
                _sort: [ 'title', 'remark' ],

                title: {
                    _name: '标题',
                    _render: '_title',
                    _node: 'text',
                    _value: 'title',
                    _common_style: {
                        theme: "txt-nav-title"
                    },
                    _sh: {},
                    _rh: false,
                    _anime: {
                        enable: true,
                        easing: "easeInOutQuad",
                        color: '#F90',
                        fontWeight: 'bolder',
                        duration: 1000,
                    },
                },
                remark: {
                    _name: '描述',
                    _render: '_remark',
                    _node: 'text',
                    _value: 'remark',
                    _common_style: {
                        theme: "txt-nav-desc"
                    },
                    _sh: {},
                    _rh: false
                }
            },
            moreIcon: {
                _name: '更多图标',
                _render: '_moreIcon',
                _node: 'icon',
                _common_style: {
                    theme: "txt-nav-note",
                    icon: 'fa fa-angle-right'
                },
                _sh: {},
                _rh: false
            }
        },*/

        /*c$jzlDatasComp: {
            _name: '表单数据',
            _node: "c$jzlDatasComp",
            _tag: "JzlDataList",
            _value: "form",
            _ss: {
                theme: "" // jzl-button--primary jzl-button--mini
            },
            _ext: {

            },
            _sh: {},
            _rh: false
        },
        c$jzlFormComp: {
            _name: '表单详情/新增',
            _node: "c$jzlFormComp",
            _tag: "JzlDataForm",
            _value: "form",
            _ss: {
                theme: "" // jzl-button--primary jzl-button--mini
            },
            _ext: {
                dataIdDef: "dataId"
            },
            _sh: {},
            _rh: false
        },*/
        /*c$chartCardComp: {
            _name: '指标卡',
            _node: "c$chartCardComp",
            _tag: "JzlChartCard",
            _value: "chartCard",
            _ss: {},
            _sh: {},
            _rh: false,
            _sort: [ 'item' ],
            item: {
                _name: '指标卡项',
                _ss: {},
                _sh: {},
                _rh: false,
                _sort: [ 'label', 'value' ],
                label: {
                    _name: '指标名',
                    _node: 'text',
                    _ss: {},
                    _sh: {},
                    _rh: false,
                },
                value: {
                    _name: '指标值',
                    _node: 'text',
                    _ss: {},
                    _sh: {},
                    _rh: false,
                }
            }
        },
        c$chartTableComp: {
            _name: '统计表格',
            _node: "c$chartTableComp",
            _tag: "JzlChartTable",
            _value: "chartTable",
            _ss: {},
            rowHeader: {
                _name: '表格标题',
                _ss: {},
                cell: {
                    _name: '标题项',
                    _render: '_cell',
                    _node: 'text',
                    _ss: {

                    }
                }
            },
            row: {
                _name: '表格行',
                _ss: {},

                cell: {
                    _name: '单元项',
                    _node: 'text',
                    _ss: {}
                },
                cellFirst: {
                    _name: '第一列',
                    _node: 'text',
                    _ss: {}
                }
            },
            rowDouble: {
                _name: '双数行',
                _ss: {},

                cell: {
                    _name: '单元项',
                    _node: 'text',
                    _ss: {}
                },
                cellFirst: {
                    _name: '第一列',
                    _node: 'text',
                    _ss: {}
                }
            }
        },
        c$chartBarComp: {
            _name: '指标卡',
            _node: "c$chartBarComp",
            _tag: "JzlChartBar",
            _value: "chartBar",
        },
        c$chartLineComp: {
            _name: '指标卡',
            _node: "c$chartLineComp",
            _tag: "JzlChartLine",
            _value: "chartLine",
        },
        c$chartPieComp: {
            _name: '指标卡',
            _node: "c$chartPieComp",
            _tag: "JzlChartPie",
            _value: "chartPie",
        },*/
        /*c$dListComp: {
            _name: 'Comp-动态列表',
            _node: "c$dListComp",
            _code: "aaaaaaaaaaaa",
            _tag: "JzlList",
            _value: "dList",
            _ss: {
                theme: "jpn-list txt-nav-list"
            },
            _ext: {
                loadMode: "fixed",
                totalDef: "dList.page.total",
                pageSize: 20
            },
            _sh: {},
            _rh: false,

            item: {
                _code: "bbbbbbbbbbb",
                _name: '列表项',
                _node: "list",
                _value: 'dList.datas',
                _ss: {
                    theme: 'txt-nav-item'
                },
                _sh: {},
                _rh: false,
                _sort: [ 'image', 'text', 'moreIcon' ],

                image: {
                    _code: "cccccccccc",
                    _name: '图片',
                    _node: 'img',
                    _value: 'image',
                    _ss: {
                        theme: "txt-nav-img"
                    },
                    _sh: {},
                    _rh: false
                },
                text: {
                    _code: "dddddddddd",
                    _name: '文字',
                    _ss: {
                        theme: "txt-nav-text"
                    },
                    _sh: {},
                    _rh: false,
                    _sort: [ 'title', 'remark' ],

                    title: {
                        _code: "eeeeeeeeeeee",
                        _name: '标题',
                        _node: 'text',
                        _value: 'title',
                        _ss: {
                            theme: "txt-nav-title"
                        },
                        _sh: {},
                        _rh: false
                    },
                    remark: {
                        _code: "ffffffffffff",
                        _name: '描述',
                        _node: 'text',
                        _value: 'remark',
                        _ss: {
                            theme: "txt-nav-desc"
                        },
                        _sh: {},
                        _rh: false
                    }
                },
                moreIcon: {
                    _code: "ggggggggg",
                    _name: '更多图标',
                    _node: 'icon',
                    _ss: {
                        theme: "txt-nav-note",
                        icon: 'fa fa-angle-right'
                    },
                    _sh: {},
                    _rh: false
                }
            }
        }*/
    },
    vars: [{
        prop: "sliders",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        defaultJson: [{
            image: "/assets/images/bg.png",
            title: "标题A",
            remark: "标题A的描述"
        }, {
            image: "/assets/images/bg.png",
            title: "标题B",
            remark: "标题B的描述"
        }, {
            image: "/assets/images/bg.png",
            title: "标题C",
            remark: "标题C的描述"
        }]
    }, {
        prop: "dList",
        type: "json",
        label: "列表数据源",
        default: null,
        force: true,
        initType: "static",
        iTypes: [ 'static', 'api', 'mapi' ],
        iDis: true,
        defaultJson: {
            datas: [{
                image: "/assets/images/bg.png",
                title: "标题A",
                remark: "描述"
            }, {
                image: "/assets/images/bg.png",
                title: "标题B",
                remark: "描述"
            }, {
                image: "/assets/images/bg.png",
                title: "标题C",
                remark: "描述"
            }],
            page: {
                page: 1,
                total: 3
            }
        }
    }, {
        prop: "chartBar",
        type: "table",
        default: null,
        force: true,
        initType: "static",
        defaultTable: [
            [ "日期", "销售量Line", "口碑" ],
            [ "1月1日", "123", "500" ],
            [ "1月2日", "1223", "100" ],
            [ "1月3日", "2123", "1000" ],
            [ "1月4日", "4123", "1500" ],
            [ "1月5日", "3123", "1800" ],
            [ "1月6日", "7123", "2500" ]
        ]
    }, {
        prop: "chartLine",
        type: "table",
        default: null,
        force: true,
        initType: "static",
        defaultTable: [
            [ "日期", "销售量Line", "口碑" ],
            [ "1月1日", "123", "500" ],
            [ "1月2日", "1223", "100" ],
            [ "1月3日", "2123", "1000" ],
            [ "1月4日", "4123", "1500" ],
            [ "1月5日", "3123", "1800" ],
            [ "1月6日", "7123", "2500" ]
        ]
    }, {
        prop: "chartPie",
        type: "table",
        default: null,
        force: true,
        initType: "static",
        defaultTable: [
            [ "日期", "销售量" ],
            [ "1月1日", "123" ],
            [ "1月2日", "1223" ],
            [ "1月3日", "2123" ],
            [ "1月4日", "4123" ],
            [ "1月5日", "3123" ],
            [ "1月6日", "7123" ]
        ]
    }, {
        prop: "chartTable",
        type: "table",
        default: null,
        force: true,
        initType: "static",
        defaultTable: [
            [ "日期", "销售量Table" ],
            [ "1月1日", "123" ],
            [ "1月2日", "1223" ],
            [ "1月3日", "2123" ],
            [ "1月4日", "4123" ],
            [ "1月5日", "3123" ],
            [ "1月6日", "7123" ]
        ]
    }, {
        prop: "chartCard",
        type: "table",
        default: null,
        force: true,
        initType: "static",
        defaultTable: [
            [ "年销售额", "1999" ],
            [ "年利润额", "999" ]
        ]
    },{
        prop: "form",
        type: "json",
        default: null,
        force: true,
        initType: "api",
        iDis: true,
        iTypes: [ 'api' ],
        label: "表单定义",
        // formCode: "_ADMIN"
    }, {
        prop: "dataId",
        type: "number",
        default: 398,
        force: true,
        initType: "static",
        label: "数据ID，有数据ID则为修改数据"
    }, {
        prop: "model",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        defaultJson: [{
            image: "/assets/images/bg.png",
            title: "标题A",
            remark: "标题A的描述"
        }, {
            image: "/assets/images/bg.png",
            title: "标题B",
            remark: "标题B的描述"
        }, {
            image: "/assets/images/bg.png",
            title: "标题C",
            remark: "标题C的描述"
        }]
    }, {
        prop: "tabIndex",
        initType: "static",
        type: "number",
        default: 1
    }, {
        prop: "inputValue",
        initType: "static",
        type: "string",
        default: "你好"
    }, {
        prop: "selectValue",
        initType: "static",
        type: "string",
        default: ""
    }, {
        prop: "numberValue",
        initType: "static",
        type: "number",
        default: 4
    }, {
        prop: "checkboxValue",
        initType: "static",
        type: "json",
        default: 4,
        defaultJson: []
    }, {
        prop: "editorValue",
        initType: "static",
        type: "string",
        default: ''
    }, {
        prop: "pageValue",
        initType: "static",
        type: "number",
        default: 1
    }, {
        prop: "totalValue",
        initType: "static",
        type: "number",
        default: 100
    }, {
        prop: "pageSizeValue",
        initType: "static",
        type: "number",
        default: 15
    }, {
        prop: "checkboxList",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        defaultJson: [{
            label: "A",
            value: "A"
        }, {
            label: "B",
            value: "B"
        }, {
            label: "C",
            value: "C"
        }]
    }, {
        prop: "treeData",
        type: "json",
        default: null,
        force: true,
        initType: "static",
        defaultJson: [{
            name: '处理中心', icon: 'fa fa-star',
            children: [{
                name: '选项A', icon: 'fa fa-cube',
                children: [{ name: '选项1' }, { name: '选项2' } ]
            }, {
                name: '选项B', icon: 'fa fa-cube'
            }]
        }, {
            name: 'GOOD', icon: 'fa fa-heart'
        }]
    }]
}


// let newConfig = initPageFormItem(config);

// export default newConfig;

export default config;
